package com.farmpost.server.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.farmpost.server.pojo.Follower;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author king
 * @since 2022-04-12
 */
public interface FollowerMapper extends BaseMapper<Follower> {

    /**
     * 删除粉丝
     * @param status
     * @param updateTime
     * @param followerId
     * @return
     */
    int deleteFollower(@Param("status") int status, @Param("updateTime") LocalDateTime updateTime, @Param("followerId") Integer followerId);

    int updateFollowerId(@Param("userId") Integer userId, @Param("followerId") Integer followerId, @Param("updateTime") LocalDateTime updateTime);

    int updateFollowerStatus(@Param("userId") Integer userId, @Param("status") Integer status, @Param("updateTime") LocalDateTime updateTime);

    int updateFollowerIdStatus(@Param("userId") Integer userId, @Param("followerId") Integer followerId, @Param("status") Integer status, @Param("updateTime") LocalDateTime updateTime);
}
